package com.example.demo.mapper;


import com.example.demo.pojo.OrderDetail;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface OrderDetailMapper {

    @Insert("INSERT INTO order_details(order_id, product_id, quantity, price, created_at, user_id) " +
            "VALUES(#{orderId}, #{productId}, #{quantity}, #{price}, #{createdAt}, #{userId})")
    int insertOrderDetail(OrderDetail orderDetail);
}
